program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  fin: TextFile;
  massx, massy, masss, massf: array of Integer;
  n, i, s, j: integer;
  flag: Boolean;
begin
  AssignFile(fin, 'input.txt');
  Reset(fin);
  flag:=false;
  readln(fin,n);
  SetLength(massx, n);
  SetLength(massy, n);
  SetLength(masss, n);
  SetLength(massf, n);
  for i:=0 to n-1 do
  begin
    read(fin, massx[i]);
    Readln(fin, massy[i]);
  end;
  masss[0]:=massx[0]*massy[1]-massx[1]*massy[0]+massx[1]*massy[2]-massx[2]*massy[1]+massx[2]*massy[0]-massx[0]*massy[2];
  if (masss[0]>0) then
    massf[0]:=1;
  if (masss[0]<0) then
    massf[0]:=-1;
  for i:=1 to n-3 do
  begin
    masss[i]:=massx[i]*massy[i+1]-massx[i+1]*massy[i]+massx[i+1]*massy[i+2]-massx[i+2]*massy[i+1]+massx[i+2]*massy[i]-massx[i]*massy[i+2];
    if (masss[i]>0) then
      massf[i]:=1;
    if (masss[i]<0) then
      massf[i]:=-1;
    if (massf[i]<massf[0]) or (massf[i]>massf[0]) then
    begin
      Writeln('No');
      flag:=true;
    end;
  end;
  if  (flag=False) then
  begin
    masss[n-2]:=massx[n-2]*massy[n-1]-massx[n-1]*massy[n-2]+massx[n-1]*massy[0]-massx[0]*massy[n-1]+massx[0]*massy[n-2]-massx[n-2]*massy[0];
    if (masss[n-2]>0) then
      massf[n-2]:=1;
    if (masss[n-2]<0) then
      massf[n-2]:=-1;
    if (massf[n-2]>massf[0]) or (massf[n-2]<massf[0]) then
    begin
      writeln('No');
      flag:=true;
    end;
  end;
  if  (flag=False) then
  begin
    masss[n-1]:=massx[n-1]*massy[0]-massx[0]*massy[n-1]+massx[0]*massy[1]-massx[1]*massy[0]+massx[1]*massy[n-1]-massx[n-1]*massy[1];
    if (masss[n-1]>0) then
      massf[n-1]:=1;
    if (masss[n-1]<0) then
      massf[n-1]:=-1;
    if (massf[n-1]>massf[0]) or (massf[n-1]<massf[0]) then
    begin
      writeln('No');
      flag:=true;
    end;
  end;
  if (flag=False) then
    Writeln('Yes');
  Readln;
end.
 